Skip to content

Conversation

@abayer
Copy link
Member

@abayer abayer commented Apr 2, 2018

Minor cleanup after comments on #209

@abayer abayer requested review from jglick and svanoort April 2, 2018 15:52
}

return toAppend.toString();
return req.getContextPath() + '/' + (i == null ? "" : i.getUrl()) + u;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you manually tested both cases here?

}

return toAppend.toString();
return req.getContextPath() + '/' + (i == null ? "" : i.getUrl()) + u;
Copy link
Member

@svanoort svanoort Apr 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, why did we remove the check for if the context path has a '/' on it? We had an actual stage view bug that resulted from a similar issue.

Edit: even if it "shouldn't" happen it's a harmless check.

}

return toAppend.toString();
return Paths.get( req.getContextPath(), i == null ? "" : i.getUrl(), u).toString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Paths to concatenate class to handle slashes - will remove or add as needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am little wary of using Path for URLs, would it not result in file system-specific behavior? Maybe fine, I just haven't seen it used in this kind of context.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you would be correct. 😄

@bitwiseman bitwiseman force-pushed the snippetizerlink-cleanup branch from 4aaec74 to af2dcd1 Compare June 20, 2019 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants